﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JFLogic.Logic.Fail
{
    public class FailReason
    {
        public const int LOGIN_PWD_ERR = -1;//密码错误

        public const int LOGIN_CODE_ERR = -2;//登录验证码错误

        public const int LOGIN_UNKNOWN_ERR = -3;//登录未未知错误

        public const int LOGIN_RECOGNIZE_ERR = -4;//登录验证码未识别错误

        public const int EXCHANGE_SMSCODE_ERR = -11;//短信验证码错误

        public const int EXCHANGE_PERSON_ERR = -12;//受让人账户状态异常

        public const int EXCHANGE_UNKNOWN_ERR = -13;//受让人账户状态异常

        public const int EXCHANGE_PERSON_NOTFOUND_ERR = -13;//没有找到可用的受赠人

        public static string GetReasonStr(int failId)
        {
            string rel = "未知";
            switch (failId)
            {
                case LOGIN_PWD_ERR:
                    rel = "登录密码错误";
                    break;
                case LOGIN_CODE_ERR:
                    rel = "登录验证码错误";
                    break;
                case LOGIN_UNKNOWN_ERR:
                    rel = "登录未知错误";
                    break;
                case LOGIN_RECOGNIZE_ERR:
                    rel = "登录验证码未成功识别的错误";
                    break;
                case EXCHANGE_SMSCODE_ERR:
                    rel = "兑换短信验证码错误";
                    break;
                case EXCHANGE_PERSON_ERR:
                    rel = "兑换受让人账户状态异常";
                    break;
                case EXCHANGE_PERSON_NOTFOUND_ERR:
                    rel = "兑换没有找到可用的受赠人";
                    break;
            }
            return rel;
        }
    }
}
